package lapsnake.model.slice;

import lapsnake.model.LapAbstractSlice;
import lapsnake.model.LapExpression;
import lapsnake.model.PyAST;
import lapsnake.model.data.ChildField;
import lapsnake.model.data.OptionalChild;
import lapsnake.py.ast.ASTHelperFactory; import java.beans.PropertyVetoException;

import org.python.antlr.ast.Slice;

public class LapSlice extends LapAbstractSlice
{
	public LapSlice(PyAST pyAST, ChildField<? super LapSlice> parentField, Slice node) throws PropertyVetoException {
		super(pyAST, parentField, node);
		ASTHelperFactory.makeHelper(pyAST, lower, node.getInternalLower());
		ASTHelperFactory.makeHelper(pyAST, upper, node.getInternalUpper());
		ASTHelperFactory.makeHelper(pyAST, step, node.getInternalStep());
		buildTextNodes(node);
	}
	
	public final OptionalChild<LapExpression> lower = new OptionalChild<>(this, LapExpression.class);
	public final OptionalChild<LapExpression> upper = new OptionalChild<>(this, LapExpression.class);
	public final OptionalChild<LapExpression> step = new OptionalChild<>(this, LapExpression.class);
}